<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<s:include value="/include/header/header.jsp"></s:include>
	Billing Invoice
<s:include value="/include/header/mainNav.jsp"></s:include>
	<!--NAV ENDS HERE-->
    <!--DISPLAY STARTS HERE-->
    <div id="display-nobg">
    <!--DISPLAY INNER STARTS HERE-->
	<div id="display-inner">
		<h3>
			Invoice #<s:property value="%{bill.id}"/> 
			Period For: <s:property value="%{startDate}"/> - <s:property value="%{endDate}"/> 
		</h3>
		
		<s:iterator value="accounts" var="account">
			
			<p>
				Account: <s:property value="#account.company" />
			</p>
			
			<table >
				<s:iterator value="#account.recurring" var="recurring" >
					<tr>
						<td  class="table-width-white">
							<s:property value="#recurring.offering.description"/>
						</td>
						<td  class="table-width-white">
							<s:property value="getText('format.money', {#recurring.baseRate} )"/>
						</td>
					</tr>
				</s:iterator>
			</table>
			
			Usage Data:
			
			<table>
				<tr>
					<td class="table-width-white">
						Service
					</td>
					<td class="table-width-white">
						Sim Number
					</td>
					<td class="table-width-white">
						Charged Date
					</td>
					<td class="table-width-white">
						charge
					</td>
					<td class="table-width-white">
						usage_date
					</td>
					<td class="table-width-white">
						usage
					</td>
				</tr>
			
				<s:iterator value="#account.usage" var="usageData" >
					<tr>
						<td class="table-width-white">
							<s:property value="#usageData.var3value"/>
						</td>
						<td class="table-width-white">
							<s:property value="#usageData.var2value"/>
						</td>
						<td class="table-width-white">
							<s:property value="#usageData.charge_dt"/>
						</td>
						<td class="table-width-white">
							<s:property value="getText('format.money', {#usageData.charge} )"/>
						</td>
						<td class="table-width-white">
							<s:property value="#usageData.var0value"/>
						</td>
						<td class="table-width-white">
							<s:property value="#usageData.usage"/> <s:property value="#usageData.columnName" />
						</td>
					</tr>
				</s:iterator>
			</table>
		
		</s:iterator>
		
		Total Amount: <s:property value="getText('format.money', {total} )" />
		Contact: <s:property value="#account.firstName" />&nbsp;<s:property value="account.lastName" />
		
		<s:include value="/include/footer/footer.jsp"></s:include>		
